home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
prodpack.zip
/
DB4PPSRC.EXE
/
_FWRITE0.PRG
< prev
next >
Wrap
Text File
|
1993-05-04
|
1KB
|
43 lines
FUNCTION _FWrite0
PARAMETERS ph_file, pn_nulls
*--------------------------------------------------------------------
* NAME
* _FWrite0 - Write number of CHR(0)s to open file.
*
* SYNOPSIS
* _FWrite0( ph_file, pn_nulls )
*
* DESCRIPTION
* _FWrite0 will write out to an open file handle <ph_file>,
* <pn_nulls> null characters ( 00h ). This is useful since
* REPLICATE() currently does not support CHR(0).
*
* PARAMETERS
* ph_file - numeric file handle of the target file.
* pn_nulls - number of CHR(0)s to output.
*
* EXAMPLE
* * Write 100 nulls to the start of "MYFILE.TXT":
* lh_file = FOPEN( "MYFILE.TXT", "rw" )
* ln_var = FWrite0( lh_file, 100 )
* ln_mem = FCLOSE( "MYFILE.TXT" )
*
* SEE ALSO
* FOPEN(), FWRITE()
*--------------------------------------------------------------------
PRIVATE ln_count, ln_chrs
ln_count = 1
DO WHILE m->ln_count <= m->pn_nulls
ln_chrs = FWRITE( m->ph_file, CHR(0) )
ln_count = m->ln_count + 1
ENDDO
RETURN( m->pn_nulls )
*-- EOF: _FWrite0( ph_file, pn_nulls )